package com.bjsxt.chapter15_command;

/**
 * @ClassName ConcreteCommand
 * @Description 真正的命令对象
 * @Author 黑马程序员
 * @Date 16:37 2024/6/23
 * @Version 1.0
 **/
public class ConcreteCommand implements Command{

    // 命令真正的执行者
    private Receiver receiver;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        // 命令真正执行前或后,指向相关的处理!
        receiver.action();
    }
}
